package com.ict.web.controller.yzq;

import com.ict.common.core.controller.BaseController;
import com.ict.common.core.domain.AjaxResult;
import com.ict.common.core.domain.entity.SysDept;
import com.ict.common.core.page.TableDataInfo;
import com.ict.web.dto.QueryExpertExtractMonitorDto;
import com.ict.web.service.IReviewTaskService;
import com.ict.web.vo.ExpertExtractionMonitorListVo;
import com.ict.web.vo.ExpertInformationSheetDetailVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 专家抽取监控 Controller
 *
 * @author xss
 * @date 2022-03-03
 */
@Api(tags = "专家抽取监控")
@RestController
@RequestMapping("/expertExtractMonitor")
public class ExpertExtractMonitorController extends BaseController {

    @Autowired
    private IReviewTaskService reviewTaskService;

    /**
     * 查询专家抽取监控详情
     * @param reviewTaskId
     * @return
     */
    @ApiOperation("专家抽取监控详情")
    @GetMapping("/{reviewTaskId}")
    public AjaxResult selectExpertExtractMonITORById(@PathVariable  Long reviewTaskId,String extractTime){
        return AjaxResult.success(reviewTaskService.selectExpertExtractMonitorById(reviewTaskId,extractTime));
    }

    /**
     * 查询专家抽取监控列表
     * @param queryDto
     * @return
     */
    @ApiOperation("列表查询")
    @GetMapping("/list")
    public TableDataInfo list(QueryExpertExtractMonitorDto queryDto){
        startPage();
        List<ExpertExtractionMonitorListVo> list = reviewTaskService.selectExpertExtractMonitorList(queryDto);
        return getDataTable(list);
    }
    /**
     * 抽取单位列表
     * @return
     */
    @ApiOperation("抽取单位列表")
    @GetMapping("/extractUnit")
    public TableDataInfo extractUnit(){
        startPage();
        List<SysDept> list = reviewTaskService.extractUnit();
        return getDataTable(list);
    }
}
